package com.central.scheduler.api.service;

import com.central.common.model.Result;
import com.central.common.model.SysUser;
import com.central.common.service.ISuperService;
import com.central.scheduler.dao.model.Schedule;

import java.util.Map;

/**
 * @author Tindy
 * @date 2021/7/3
 * @describe
 */
public interface IScheduleService extends ISuperService<Schedule> {

    Result createOrUpdate(SysUser user, Schedule schedule);

    Result release(SysUser user, Long processDefinitionCode);
    /**
     * delete schedule
     *
     * @param projectId project id
     * @param scheduleId schedule id
     * @throws RuntimeException runtime exception
     */
    void deleteSchedule(Long projectId, Long scheduleId);


    Schedule querySchedule(SysUser user, Long processDefinitionCode);
}